package com.example.demo.util;
import lombok.*;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResultMsg {
    private int code;
    private String msg;
    private Object data;
    private boolean flag;


    //静态方法
    public static ResultMsg SUCCEESS(int code,String msg,Object data){
        return new ResultMsg(code,null,data,true);
    }
    public static ResultMsg FAIL(int code,String msg){
        return new ResultMsg(code,msg,null,false);
    }
}
